import { requestType } from '~/config/enum.config';

const SERVICE = 'management-service';
const CONTROLLER = 'strategyConfigController';

/**
 * 策略控制器
 */
export default {
  /**
   * 获取支持的策略字段
   */
  getStrategyFields: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'getStrategyFields',
    type: requestType.Get,
  },
  /**
   * 创建策略
   */
  createStrategy: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'createStrategy',
    type: requestType.Post,
  },
  /**
   * 修改策略
   */
  updateStrategy: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'updateStrategy',
    type: requestType.Put,
  },
  /**
   * 分页查询策略
   */
  queryStrategyConfigPage: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'queryStrategyConfigPage',
    type: requestType.Get,
  },
  /**
   * 通过ID获取策略
   */
  getOneById: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'getOneById',
    type: requestType.Get,
  },
  /**
   * 通过ID删除策略
   */
  delete: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'delete',
    type: requestType.Delete,
  }
};
